<?php
$socket = socket_create(AF_INET,SOCK_STREAM,SOL_TCP);
$res = socket_connect($socket,'172.18.113.206',8080);
while (true){
    fwrite(STDOUT,"输入内容");
    $strr = fgets(STDIN);
    socket_write($socket,$strr);
    $connect = socket_read($socket,1024);
    echo $connect.PHP_EOL;
}
socket_close($socket);